/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package br.gov.cemaden.library.model.alerta.automatico;

import br.gov.cemaden.library.interfaces.MunicipioInterface;
import br.gov.cemaden.library.interfaces.alerta.automatico.LocalidadeInterface;
import com.vividsolutions.jts.geom.Geometry;

/**
 *
 * @author alan.oliveira
 */
public abstract class BaseLocalidade implements LocalidadeInterface {
    
    protected Integer id;
    
    protected String descricao;
    
    protected Geometry geometry;
    
    protected Geometry buffer_10km;
    
    protected Geometry buffer_30km;
    
    protected Geometry buffer_50km;
    
    protected Integer codIBGE;
    
    protected Double latitude;
    
    protected Double longitude;
    
    protected MunicipioInterface municipio;
    
    protected String ativa;

    public BaseLocalidade() {}        

    public void setDescricao(String descricao) {
        this.descricao = descricao;
    }

    public void setGeometry(Geometry the_geom) {
        this.geometry = the_geom;
    }

    public void setBuffer_10km(Geometry buffer_10km) {
        this.buffer_10km = buffer_10km;
    }

    public void setBuffer_30km(Geometry buffer_30km) {
        this.buffer_30km = buffer_30km;
    }

    public void setBuffer_50km(Geometry buffer_50km) {
        this.buffer_50km = buffer_50km;
    }

    public void setCodIBGE(Integer codIBGE) {
        this.codIBGE = codIBGE;
    }

    public void setLatitude(Double latitude) {
        this.latitude = latitude;
    }

    public void setLongitude(Double longitude) {
        this.longitude = longitude;
    }

    public void setMunicipio(MunicipioInterface municipio) {
        this.municipio = municipio;
    }

    public void setAtiva(String ativa) {
        this.ativa = ativa;
    }

    public void setId(Integer id) {
        this.id = id;
    }    

    @Override
    public int hashCode() {
        int hash = 3;
        hash = 53 * hash + (this.id != null ? this.id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final BaseLocalidade other = (BaseLocalidade) obj;
        return this.id == other.id || (this.id != null && this.id.equals(other.id));
    }

    @Override
    public String toString() {
        return "BaseLocalidade{" + "descricao=" + descricao + ", codIBGE=" + codIBGE + ", latitude=" + latitude + ", longitude=" + longitude + ", municipio=" + municipio + '}';
    }
    
    
    
}
